package com.dexcoder.job.mblog;

import com.alibaba.fastjson.JSON;
import com.dexcoder.demo.utils.JdbcUtils;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by minniezhou on 2017/5/21.
 */
public class MblogSpider {
    public static void setMblogContent(){
        System.out.println("添加Mblog文章" + new Date());
    }

    public static List<Map<String,Object>> getLatestKeyword(){
        JdbcUtils jdbcUtils = new JdbcUtils();
        jdbcUtils.getConnection();
        String sql = "SELECT * from mto_keyword t where t.create_time = (SELECT k.create_time FROM mto_keyword k GROUP BY k.create_time order by k.create_time desc limit 0,1)";
        return jdbcUtils.findResult(sql);
    }

    public static void main(String [] args){
        System.out.println(JSON.toJSONString(getLatestKeyword(),true));
    }
}
